package com.itheima.user.service.impl;

import com.itheima.common.entity.Result;
import com.itheima.pojo.Setmeal;
import com.itheima.user.mapper.SetmealMapper;
import com.itheima.user.service.SetmealService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class SetmealServiceImpl implements SetmealService {
    @Autowired
    private SetmealMapper setmealMapper;

    /**
     * 查询全部套餐信息
     * @return
     */
    public List<Setmeal> findAll() {
        return setmealMapper.findAll();
    }

    /**
     * 根据id查询套餐详情
     * @param id
     * @return
     */
    @Override
    public Setmeal findById(Integer id) {
        Setmeal setmeal = setmealMapper.findById(id);
        return setmeal;
    }




}
